<?php
/**
 * Created by PhpStorm.
 * User: Raytine
 * Date: 2019/11/21
 * Time: 22:30
 */

namespace App\Providers;


use Overtrue\EasySms\EasySms;
use Overtrue\LaravelWeChat\ServiceProvider;
use EasyWeChat\MiniProgram\Application as MiniProgram;
class AgentServiceProvider extends ServiceProvider
{
    public function register()
    {
        /**
         * 设置数据库字段长度191
         */
        \Schema::defaultStringLength(191);
        $this->app->singleton("mini.agent", function ($laravelApp) {
            $app = new MiniProgram(config('miniAgent'));
            return $app;
        });
       $this->app->singleton('sms', function ($laravelApp) {
            $app=new EasySms(config('sms'));
            return $app;
        });
    }
}